# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=quickrecon
pkgver=0.3.2
pkgrel=8
groups=('blackarch' 'blackarch-recon' 'blackarch-scanner')
pkgdesc='A python script for simple information gathering. It attempts to find subdomain names, perform zone transfers and gathers emails from Google and Bing.'
arch=('any')
url='http://packetstormsecurity.com/files/104314/QuickRecon-0.3.2.html'
license=('GPL3')
depends=('python2' 'pyqt4-common' 'python2-httplib2' 'python2-sip'
         'python2-html5lib' 'python2-beautifulsoup4' 'python2-pyqt4')
source=("https://dl.packetstormsecurity.net/UNIX/scanners/${pkgname}_gui-$pkgver.tar.gz")
sha512sums=('8263efc4be4bdeb59f54bdf6d0be508a8bd84d974484b26a6ad665d9dd1ab06ea6fa4bc65c7f7fc9d7ad4667af18f7f85a7c9b7f8a77eaee2b014baa217ede41')

package() {
  cd "quickrecon_gui-$pkgver"

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/$pkgname"

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README
  install -Dm 644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"

  rm README COPYING

  cp -a * "$pkgdir/usr/share/$pkgname/"

  cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
cd /usr/share/$pkgname
exec python2 ${pkgname}_gui.pyw "\$@"
EOF

  chmod +x "$pkgdir/usr/bin/$pkgname"
}

